package com.shf.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.shf.entity.Syslog;
import com.shf.mapper.SyslogMapper;
import com.shf.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * log业务实现接口类
 * @author 叶枫
 */
@Service
public class LogServiceImpl implements LogService {
    @Autowired
    private SyslogMapper syslogMapper;
    @Override
    public PageInfo<Syslog> findAll(Integer page ,Integer size) {
        PageHelper.startPage(page,size);
     List<Syslog> syslogList = syslogMapper.findAll();

        PageInfo<Syslog> pageInfo = new PageInfo<Syslog>(syslogList);
        return pageInfo;
    }
}
